import request from '@/utils/request'

// 查询小区CRUD列表
export function listQuarters(query) {
  return request({
    url: '/household/quarters/list',
    method: 'get',
    params: query
  })
}

// 查询小区CRUD详细
export function getQuarters(id) {
  return request({
    url: '/household/quarters/' + id,
    method: 'get'
  })
}

// 查询小区CRUD详细
export function getBuildingList() {
  return request({
    url: '/household/quarters/getBuildinglist',
    method: 'get'
  })
}

// 新增小区CRUD
export function addQuarters(data) {
  return request({
    url: '/household/quarters',
    method: 'post',
    data: data
  })
}

// 修改小区CRUD
export function updateQuarters(data) {
  return request({
    url: '/household/quarters',
    method: 'put',
    data: data
  })
}

// 删除小区CRUD
export function delQuarters(id) {
  return request({
    url: '/household/quarters/' + id,
    method: 'delete'
  })
}
